'''英文字符频率统计。编写一个程序，对给定字符串中出线的a~z字母频率进行分析，
忽略大小小，采用降序方式输出。'''
s = input('请输入一个含有字母的字符串：')
s = s.lower()
for ch in '!"#$%&()*+,-./:;<=>?@[\\]^_‘{|}~ ':
        s = s.replace(ch,'')
frequency = {}
for letter in s:
    frequency[letter] = frequency.get(letter,0) +1
items = list(frequency.items())
items.sort(key=lambda x:x[1],reverse=True)
for i in range(len(frequency)):
    letter,Frequency = items[i]
    print('{0:<10}{1:>5}'.format(letter,Frequency))
